package som.simon.reactor;

import java.io.IOException;
import java.util.Random;

public class SimonUtil {

    public static final String NUMBER_SEVEN_FORMAT = "%07d";
    public static final Random random = new Random();

    public static <T> String format(T count) {
        return NUMBER_SEVEN_FORMAT.formatted(count);
    }

    public static void main(String[] args) {
        System.out.println(format(5));
    }

    public static void pause() {
        try {
            System.in.read();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static void sleep(Integer seconds) {
        try {
            Thread.sleep(seconds * 1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    public static void sleep() {
        sleep(1);
    }

    public static Integer random() {
        return random.nextInt(100);
    }

}
